/* 人员管理 */
const person = () => import("@/pages/person")
/* 材料管理 */
const material = () => import("@/pages/material")
/* 用料单 */
const material_list = () => import("@/pages/material_list")
const ml_editor = () => import("@/pages/material_list/ml_editor")
const ml_deal = () => import("@/pages/material_list/ml_deal")
const ml_commit = () => import("@/pages/material_list/ml_commit")
const ml_status = () => import("@/pages/material_list/ml_status")
const ml_total = () => import("@/pages/material_list/ml_total")
/* 采货单 */
const purchase = () => import("@/pages/purchase")
const p_editor = () => import("@/pages/purchase/p_editor")
const p_deal = () => import("@/pages/purchase/p_deal")
const p_commit = () => import("@/pages/purchase/p_commit")
const p_total = () => import("@/pages/purchase/p_total")

/* 动态路由 */
const dynamicRoutes = [
    {
        path: '/person',
        name: "Person",
        component: person,
        meta: {
            name: "人员信息",
            icon: "el-icon-user-solid"
        }
    },
    {
        path: '/material',
        name: "Material",
        component: material,
        meta: {
            name: "材料信息",
            icon: "el-icon-suitcase"
        }
    },
    {
        path: '/materialList',
        name: "Material_list",
        component: material_list,
        meta: {
            name: "用料单",
            icon: "el-icon-document-copy"
        },
        children: [
            {
                path: '/m_editor',
                name: 'Material_editor',
                component: ml_editor,
                meta: {
                    name: "用料单编辑"
                }
            },
            {
                path: '/m_deal',
                name: 'Material_deal',
                component: ml_deal,
                meta: {
                    name: "用料单处理"
                }
            },
            {
                path: '/m_commit',
                name: 'Material_commit',
                component: ml_commit,
                meta: {
                    name: "提交记录"
                }
            },
            {
                path: '/m_status',
                name: 'Material_status',
                component: ml_status,
                meta: {
                    name: "用料情况"
                }
            },
            {
                path: '/m_total',
                name: 'Material_total',
                component: ml_total,
                meta: {
                    name: "用料单查询"
                }
            },
        ]
    },
    {
        path: '/purchase',
        name: "Purchase",
        component: purchase,
        meta: {
            name: "采购单",
            icon: "el-icon-document"
        },
        children: [
            {
                path: '/p_editor',
                name: 'P_editor',
                component: p_editor,
                meta: {
                    name: "采购单编辑"
                }
            },
            {
                path: '/p_deal',
                name: 'P_deal',
                component: p_deal,
                meta: {
                    name: "采购单处理"
                }
            },
            {
                path: '/p_commit',
                name: 'P_commit',
                component: p_commit,
                meta: {
                    name: "提交记录"
                }
            },
            {
                path: '/p_total',
                name: 'P_total',
                component: p_total,
                meta: {
                    name: "采购单查询"
                }
            },
        ]
    }
]

export default dynamicRoutes